﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class RequestPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var strPrint = "";

         strPrint += "~Your browser :" + Request.Browser.ToString();
         Trace.Warn(Request.Browser.ToString());

        strPrint += "~Content Type :" + Request.ContentType.ToString();
        Trace.Warn(Request.ContentType.ToString());

        strPrint += "~Number of cookies : Covered in future lecture";
       

        strPrint += "~Form Control Value :" + Request.Form["Text1"];
        Trace.Warn(Request.Form["Text1"]);

        strPrint += "~Path :" + Request.Path.ToString();
        Trace.Warn(Request.Path.ToString());

        strPrint += "~Path Info:" + Request.PathInfo.ToString();
        Trace.Warn(Request.PathInfo.ToString());

        strPrint += "~Physical Application Path:" + Request.PhysicalApplicationPath.ToString();
        Trace.Warn(Request.PhysicalApplicationPath.ToString());

        strPrint += "~Physical Path:" + Request.PhysicalPath.ToString();

        Trace.Warn(Request.PhysicalPath.ToString());

        strPrint += "~Raw URL:" + Request.RawUrl.ToString();
        Trace.Warn(Request.RawUrl.ToString());

        strPrint += "~Request Type:" + Request.RequestType.ToString();
        Trace.Warn(Request.RequestType.ToString());

        strPrint += "~URL:" + Request.Url.ToString();
        Trace.Warn(Request.Url.ToString());

        strPrint += "~QueryString: Covered in future lecture";

        strPrint += "~Url Referrer:" + ((Request.UrlReferrer == null) ? "<b>No Url Refer</b>" : Request.UrlReferrer.ToString());
        Trace.Warn(Request.UrlReferrer.ToString());

        strPrint += "~Path Info:" + Request.PathInfo.ToString();
        Trace.Warn(Request.PathInfo.ToString());

        strPrint += "~User Agent:" + Request.UserAgent.ToString();
        Trace.Warn(Request.UserAgent.ToString());

        strPrint += "~User Host Address:" + Request.UserHostAddress.ToString();
        Trace.Warn(Request.UserHostAddress.ToString());

        strPrint += "~User Host Name:" + Request.UserHostName.ToString();
        Trace.Warn(Request.UserHostName.ToString());

        strPrint = strPrint.Replace("~", "<br>");

        Response.Write(strPrint);
    }
   
    
}
